@import '../../styles/themes/default.less';

.rk-password-input {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;

  input {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: block;
    width: 200%;
    height: 100%;
    margin-left: -100%;
    color: transparent;
    text-indent: -999rem;
    background: transparent;
    border: none;
    outline: none;
    appearance: none;
    caret-color: transparent;
  }

  .line {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: @password-border-color;
    font-weight: bold;
    font-size: 24px;
    text-align: center;
    border: 1px solid @password-border-color;
    border-radius: 6px;

    &.animated::before {
      position: absolute;
      top: 25%;
      left: 50%;
      display: block;
      width: 2px;
      height: 50%;
      background-color: @password-border-color;
      animation-name: coruscate;
      animation-duration: 1s;
      animation-iteration-count: infinite;
      animation-fill-mode: both;
      content: '';
    }

    &.line.highlight {
      color: @password-input-color;
      border-color: @password-input-color;
    }

    .dot {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 10px;
      height: 10px;
      background-color: #000;
      border-radius: 100%;
      transform: translate(-50%, -50%);
    }
  }
}

@keyframes coruscate {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
